package day05.practice;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/15
 */
public class Practice03 {
    public static void main(String[] args) {
        System.out.println("数列前20项和为："+Sum(20));
    }
    public static double Sum(int n){
        double sum=0;
        for(int i=1;i<=n;i++){
            sum+=(i+1)/i;
        }
        return sum;
    }

}
